package mixins

import clases._
import scala.util.Random

trait ConTecho extends Alquilable {
  abstract override def tuPrecio(reserva: Reserva): Double = super.tuPrecio(reserva) * ( if(llueve) 1.1 else 1)


  
  def llueve(): Boolean = {
    ServicioMeteorologico.llueve
    
  }


  object ServicioMeteorologico {
    val rn = new Random
    def llueve:Boolean = rn.nextBoolean
  }
}